//封装品牌管理相关的请求函数
import request from '@/utils/request'

//获取品牌列表接口
export const reqTradeMarkList = (page, limit) => request({url: `/admin/product/baseTrademark/${page}/${limit}`, method: 'get'})

//添加品牌接口//修改品牌接口
export const reqAddOrupdateTradeMark = (tradeMark) => {
    //给服务器携带有ID---修改
    if(tradeMark.id) {
        return request({ url: '/admin/product/baseTrademark/update', method: 'put', data: tradeMark})
    } else {
        //新增
        return request({ url: '/admin/product/baseTrademark/save', method: 'post', data: tradeMark})
    }
}

//删除某个品牌
export const reqDeleteTradeMark = (id) => request({ url: `/admin/product/baseTrademark/remove/${id}`, method: 'delete'})















